﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using MDL;

namespace DAL
{
    public class DAL_AdminType
    {
        public static List<AdminType> 登录绑定()
        {
            string sql = "select * from AdminType";
            List<AdminType> list = new List<AdminType>();
            using (SqlDataReader dr = DBHelper.白道(sql, null, CommandType.Text))
            {
                while (dr.Read())
                {
                    AdminType a = new AdminType();
                    a.UserTypeID = Convert.ToInt32(dr[0]);
                    a.UserTypeName = dr[1].ToString();
                    list.Add(a);
                }
            }
            return list;
        }
    }
}
